<ul class="nav main">
    <li>
        <a href="./">Titulinis</a>
    </li>
<?php if($this->getGalleryService() != null){
    $galerys = $this->galleryService->getAll();
    if($galerys != null){
        foreach ($galerys as $galery) { ?>
    <li>
        <a href="./gallery/view/<?php echo $galery->id;  ?>/" ><?php echo $galery->title; ?></a>
    </li>
     <?php } } }?>
    <li>
        <a href="./info/contact/">Kontaktai</a>
    </li>
    <li>
        <a href="./">Titulinis</a>
    </li>
    <?php if($this->isUserLogedIn()){ ?>
    <li class="secondary">
        <a href="./user/logout/">Atsijunkti</a>
    </li>
    <?php }else{?>
    <li class="secondary">
        <a href="./user/login/form/">Prisijunkti</a>
    </li>
    <?php }?>
</ul>

